home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
mc51bugs
/
q24291
< prev
next >
Wrap
Text File
|
1988-07-20
|
820b
|
26 lines
Q24291 Bad Code Generation with Undefined Value of I
C Compiler
5.00
MS-DOS
Problem:
The compiler seems to generate incorrect code for a function call
of the following form, where i1, i2 and I all are declared as ints:
func((I = i1,I*I),(I = i2,I*I));
Response:
Please note that constructs such as the one above are quite
unusual. Note that the value of I is undefined after the function
call; most C programmers will avoid expressions that produce similar
undefined side effects; therefore, very few customers will encounter
this problem.
We recommend that you recode your function call (or change your
macro) as follows avoid the undefined side effect and generate better
code:
foo ( i1*i1, i2*i2 );
Keywords: TAR62152 buglist5.00 buglist5.10
Updated 88/07/21 03:19